<?php /* Smarty version 2.6.19, created on 2012-10-03 12:49:35
         compiled from D:/xampp/htdocs/nghiepquang/templates/PublicSurvey/PublicSurvey.tpl */ ?>
<?php if ($this->_tpl_vars['show_survey'] && $this->_tpl_vars['opts']): ?>
    <?php echo '
    <style>
        ul.e-survey {
            padding-left : 5px;
        }

        ul.e-survey>li {
            line-height   : 24px;
            padding-left  : 5px;
            border-bottom : 1px dotted #444;
            position: relative;
            margin:5px 0;
            clear: both;
        }

        ul.e-survey>li:last-child {
            border-bottom : none;
        }

        ul.e-survey>li label {
            display     : inline-block;
            margin-left : 18px;
            color: #888888;
        }
        ul.e-survey>li input{
            position: absolute;
            top: 5px !important;
        }
    </style>
    '; ?>

<div class="box">
<div class="title_sidebar">
    <p>Thăm dò ý kiến</p>
</div>
<div class="support-online get-idea" style="color: #fff !important;">
    <ul>
        <li class="s-g">
            <div class="s-g-name"><?php echo $this->_tpl_vars['question']; ?>
</div>
            <ul class="e-survey">
                <?php $_from = $this->_tpl_vars['opts']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['item']):
?>
                    <li>
                        <span class="s-name" style="position: relative;">
                            <span style="position: absolute;left: 0;display: inline-block;margin-right: 15px;top:-5px"><?php echo $this->_tpl_vars['item']['control']; ?>
</span>  <label for="survey_id_<?php echo $this->_tpl_vars['item']['id']; ?>
" class=""><?php echo $this->_tpl_vars['item']['option']; ?>
</label>
                        </span>
                    </li>
                    <div class="mb5">

                    </div>
                <?php endforeach; endif; unset($_from); ?>


            </ul>
        </li>
    </ul>
    <div id="poll_a" class="idea-home">
        <a <?php echo $this->_tpl_vars['onclick_rate']; ?>
 style="float:left;display:block;margin-top:1px;line-height:normal;height:auto;text-align:center" id="btn">Biểu quyết</a>
        <a <?php echo $this->_tpl_vars['onclick_view']; ?>
 style="float:right;display:block;margin-top:1px;line-height:normal;height:auto;text-align:center" id="btn">Kết quả</a>
        <div class="c"></div>
    </div>
</div>
</div>    <?php echo '
    <script>
        function survey_list(item_name) {
            var arr = document.getElementsByName(item_name);
            if (arr.length) {
                st = \'\';
                for (i = 0; i < arr.length; i++) {
                    if (arr[i].checked) {
                        if (st != \'\') {
                            st += \',\';
                        }
                        st += arr[i].value;
                    }
                }
                return st;
            }
            else {
                if (arr.checked) {
                    return arr.value;
                }
            }
            return \'\';
        }
    </script>
    '; ?>

<?php endif; ?>
<?php if ($this->_tpl_vars['is_admin']): ?>
    <?php if ($this->_tpl_vars['edit']): ?><span style="margin-right:10px"><?php echo $this->_tpl_vars['edit']; ?>
</span><?php endif; ?> <?php if ($this->_tpl_vars['delete']): ?><span style="margin-right:15px"><?php echo $this->_tpl_vars['delete']; ?>
</span><?php endif; ?> <?php echo $this->_tpl_vars['admin']; ?>

<?php endif; ?>